package service

import (
	"gitee.com/Luna-CY/Golang-Project-Template/internal/context"
	"gitee.com/Luna-CY/Golang-Project-Template/internal/errors"
	"gitee.com/Luna-CY/Golang-Project-Template/internal/interface/dao"
	"gitee.com/Luna-CY/Golang-Project-Template/model"
)

type SystemSms interface {
	// LogTimeTo 定时发送短信
	LogTimeTo(ctx context.Context, telephone string, templateCode string, templateParams map[string]string, sendTime int64) errors.Error

	// SendNowTo 发送短信
	SendTimeTo(ctx context.Context, log *model.SystemSmsLog) errors.Error

	// ListSmsLogByCondition 根据条件查询短信日志
	ListSmsLogByCondition(ctx context.Context, page int, size int, options ...dao.SystemSmsLogOption) (int64, []*model.SystemSmsLog, errors.Error)

	// Cancel 取消定时发送的短信
	Cancel(ctx context.Context, log *model.SystemSmsLog) errors.Error

	// UpdateLog 更新短信日志
	UpdateLog(ctx context.Context, log *model.SystemSmsLog, options ...SystemSmsLogField) errors.Error
}
